Skip to content

[common-go] continue on hashConfig errors #20752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 16, 2025
Merged

[common-go] continue on hashConfig errors #20752

merged 4 commits into from
Apr 16, 2025

Conversation

kylos101
Copy link
Contributor

@kylos101 kylos101 commented Apr 15, 2025

Description

We used to return and stop watching a file if the hashConfig function returned an error. Now we log the error (including the event name) so we can later try again on subsequent fsnotify events.

Related Issue(s)

Fixes CLC-1304

How to test

Update the image-pull-secret in this preview environment, and assert that file watcher picks up the new value in the logs.

In the below picture, you'll see 3 entries, 1 for the initial start and 2 where I changed the secret value path via: kubectl patch secret image-pull-secret --patch '{"data":{".dockerconfigjson":"'$(cat patch.json | base64 -w 0)'"}}'

image

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@kylos101 kylos101 changed the title [common-go] backoff and retry on hashConfig errors [common-go] backoff on hashConfig errors and avoid ending the file watch Apr 15, 2025
@kylos101 kylos101 marked this pull request as ready for review April 15, 2025 21:30
@kylos101 kylos101 requested review from a team as code owners April 15, 2025 21:30
This way, subsequent changes to the watched file may be honored
@roboquat roboquat added size/XS and removed size/M labels Apr 16, 2025
@kylos101 kylos101 changed the title [common-go] backoff on hashConfig errors and avoid ending the file watch [common-go] continue on hashConfig errors Apr 16, 2025
Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

@kylos101
Copy link
Contributor Author

Testing again for posterity:
image

The change at 16:38 is because of a patch, the prior changes on the 30m mark are from a cronjob.

@roboquat roboquat merged commit e5b9a3c into main Apr 16, 2025
46 of 47 checks passed
@roboquat roboquat deleted the kylos101/CLC-1304 branch April 16, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants